# 求 beg, end 这个范围的整数之和
def calcSum(beg, end):
    theSum = 0
    for i in range(beg, end + 1):
        theSum += i
    return theSum


result = calcSum(1, 100)
print(result)
